package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.db.SoultestResult;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SoultestResultMapper extends BaseMapper<SoultestResult> {
    /**
     *  Rand()函数是对查询后的结果进行随机的打乱 保证我们每次获取的相似用户都是随机的
     */
    @Select("SELECT * FROM tb_soultest_result where type = #{type} ORDER BY RAND() LIMIT 10")
    List<SoultestResult> getSimilarYou(Long type);
}
